@extends('wap.layouts.master')
@section('title','球队列表')

@section('content')

<div class="aw-main aw-user aw-user-team">
	<ul class="aw-assest-form aw-bg-fff aw-border-none">
		<li class="aw-form-li">
			<div class="aw-left">搜索球队</div>
			<form class="aw-conter" action="javascript:Input_Search();">
				<input v-on:keyup.enter="List_Search()" type="search" placeholder="请输入球队名" id="name" name="name" v-model="form.name" :value="form.name" class="aw-text-left">
			</form>
		</li>
	</ul>
	<ul class="aw-assest-user-list">
		<li class="aw-assest-user-list-li" v-for="(list,key) in list_page">
			<div class="aw-assest-li-img"><img :src="list.img ? list.img : '/img/default_160_160.png'" onerror="javascript:this.src='/img/default_160_160.png';"></div>
			<div class="aw-assest-li-conter aw-pr20">
				<p>@{{list.name}}</p>
				<p class="aw-li-conter-desc">球队人数：<span>@{{list.people_number}}</span> &nbsp; 完成比赛：<span>@{{list.count}}</span></p>
			</div>
			<a :href="'/wap/team/info?team_id='+list.id" class="aw-icon aw-icon-more aw-right"></a>
			<a :href="'/wap/team/info?team_id='+list.id" class="aw-position_a_a"></a>
		</li>
	</ul>
	<vue-loding :info_page="info_page"></vue-loding>
</div>

@section('pagejs')
@parent

<script type="text/javascript" src="/wap/js/vue-loding.js"></script>
<script type="text/javascript">
var Vue_Data={
	list_page:{},//获取球队列表
	info_page:{page:1,count:0,tips:'球队'},
	form:{name:''}
}
//获取球队列表
var AD_list_page={
	api:'/api/team/team-list',
	form_data:Vue_Data.form,
	tips:false,
}
//获取分页列表-全局通用
Get_Refresh_Page_List()
vm=new Vue({
	el:'#Vue-body',
	data:Vue_Data,
	components:{
		'vue-loding':V_Assest_loding,
	},methods:{
		Get_List_Data:function(push){
			//更新数据
			$.extend(AD_list_page.form_data,this.form);
			Get_Refresh_Page_List(push)
		},List_Search(){
			//搜索
			this.Get_List_Data()
		}
	},watch:{
	    'form.name':function(val,oldval){
	        vm.List_Search()
	    }
	}
})
function Input_Search(){
	vm.List_Search()
}
</script>
@endsection

@endsection

